package com.jay.lang.management.clazz;

import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;

public class MemoryUsageCls {
	public static void main(String[] args) {
		MemoryMXBean mxbean = ManagementFactory.getMemoryMXBean();
		MemoryUsage mu = mxbean.getNonHeapMemoryUsage();
		System.out.println(mu.getCommitted());
		System.out.println(mu.getInit());
		System.out.println(mu.getMax());
		System.out.println(mu.getUsed());
		System.out.println(mu.getClass());
		System.out.println(mu);
	}
}
